package br.com.nooclix.salon.ui.util
{
	import mx.containers.Canvas;
	import mx.controls.HRule;
	import mx.controls.Label;
	import mx.controls.TextInput;
	import mx.effects.Fade;
	import mx.effects.Zoom;
	
	public class KBaseContainer extends Canvas
	{
		
		public var stateDefault:String;
		public var titleLabel:Label;
		public var rule:HRule;
		public function KBaseContainer()
		{
			super();
			createComponents();
		}
		
		public function open():void{
			var zoom:Fade = new Fade();
			zoom.duration = 600;
			zoom.play([this]);
			currentState = stateDefault;	
			
		}
		
		public function openNoTitle():void{
			titleLabel.visible = false;
			rule.visible = false;
			open();	
			
		}
		/*
		<mx:HRule x="10" y="52" width="745" right="20" left="10"/>
		
		<mx:Label x="10" y="21" text="Opções" 
		fontWeight="bold" fontSize="14" color="#F7FAFB" width="125"/>
		*/
		private function createComponents():void{
			
			titleLabel = new Label();
			titleLabel.setStyle("fontWeight","bold");
			titleLabel.setStyle("fontSize","16");
			titleLabel.setStyle("color","#F7FAFB");
			titleLabel.x = 20;
			titleLabel.y = 20;
			titleLabel.text = "Opções";
			
			this.addElement(titleLabel);
			
			rule = new HRule(); 
			rule.x = 20;
			rule.y = 52;
			rule.width = 1000;
			rule.right = 20;
			rule.left = 10;
			
			this.addElement(rule);
			
		
		}
	}
}